<?php
/**
* @package Super header module for Joomla! 1.6
* @author http://www.joomla2you.com
* @copyright (C) 2011- joomla2you.Com
* @license PHP files are GNU/GPL
**/
defined('_JEXEC') or die('Restricted access');
JHTML::_('behavior.mootools');
$document 	= JFactory::getDocument(); 
$document->addStyleSheet(JURI::base() . 'modules/mod_ju_supershow/assets/css/ju_supershow.css');
$document->addScript(JURI::base() . 'modules/mod_ju_supershow/assets/js/ju_supershow.js');

$cssMod = "width:".$params->get('jusupershow_width',960)."px;height:".$params->get('jusupershow_height',337)."px";
?>
<script type="text/javascript">
var startSlideshow<?php echo $moduleId; ?> = function() {
var juSupershow = new JUSlideSupershow({
container:'slider<?php echo $moduleId; ?>',
slices:<?php echo (int)$params->get('jusupershow_no_slice',15); ?>,
effect:'<?php echo $params->get('jusupershow_effect_type','random'); ?>',
autoRun:<?php echo$params->get('jusupershow_autorun',1); ?>,
directionNav:<?php echo $params->get('jusupershow_enable_btn',1); ?>,
enableDes:<?php echo $params->get('jusupershow_enable_description',1); ?>,
heightDesc:<?php echo $params->get('jusupershow_height_des',50); ?>
}); 
};
window.addEvent('load',startSlideshow<?php echo $moduleId; ?>);
</script>
<div style="display: none;"><a title="Joomla Templates" href="http://www.joomla2you.com">Joomla Templates</a> and Joomla Extensions by joomla2you.Com</div>
<div class="ju_supershow_wrap" style="<?php echo $cssMod; ?>">
<div class="supershowSlider" id="slider<?php echo $moduleId; ?>">
<?php foreach($slides as $item) { ?>
<?php if($item->thumbl) { ?><img src="<?php echo $item->thumbl; ?>" alt="" /> <?php } ?>
<?php } ?>
<?php foreach($slides as $item) { ?>
<div class="description" style="display:none">
<?php if($params->get('jusupershow_enable_link_article')) { ?>
<h2><a href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a></h2>
<?php } else { ?>
<h2><?php echo $item->title; ?></h2>	
<?php } ?>
<p><?php echo $item->introtext; ?></p>
</div>
<?php } ?>
</div>
</div>